import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'

// 导入全局的样式
import '@/styles/reset.scss'
// 导入element-plus的样式
import 'element-plus/dist/index.css'
// 导入权限模块
import './permission'

const app = createApp(App)
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
// 注册element-plus中文包
app.use(ElementPlus, {
  locale: zhCn,
})

app.use(pinia)
app.use(router)

app.mount('#app')
